package com.sumainfor.pc.market.controller.rentadviser;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.market.service.RdTenantAskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @Date 2018年11月7日
 * @Describe 工程部查询房源配置
 */
@RestController
@RequestMapping("/rentadviser/RdTenantAskController")
public class RdTenantAskController implements Serializable {
    @Autowired
    private RdTenantAskService rdTenantAskService;
    /**
     * 根据客户编号查询客户的接待记录
     */
    @GetMapping("/getTenantAskListByTenId")
    public JsonResult getTenantAskListByTenId(@RequestParam Map<String,Object>params){
        JsonResult result=new JsonResult();
        List<Map<String,Object>> list=rdTenantAskService.getTenantAskListByTenId(params);
        if (list!=null){
            result.put(list);
        }else{
            result.putFailed("服务器繁忙");
        }
        return result;
    }
}
